import React, { Component } from "react";
import { Link } from 'react-router-dom'
import "./Login.scss"

class Login extends Component {
    state = {
        account: '', //账号
        password: '' //密码
    }

    // 账号
    changaccount=(e)=>{
        let account=e.target.value
        this.setState({
            account
        })
    }

    // 密码
    changpassword=(e)=>{
        let password=e.target.value
        this.setState({
            password
        })
    }

    render() {
        return (<>
            <div className="boxA">
                <div className="box">
                    <div className="header">
                        <h1>登录</h1>
                    </div>
                    <div className="cneter">
                        <div className="left">
                            <h2>账号</h2>
                            <input type="text" value={this.state.account} onChange={this.changaccount}/>
                        </div>
                        <div className="left" value={this.state.password} onChange={this.changpassword}>
                            <h2>密码</h2>
                            <input type="password" />
                        </div>
                    </div>
                    <div className="btn">
                        <button onClick={this.Loginbtn}>登录</button>
                        <Link to={'/Home'}>登录</Link>
                        <button>重置</button>
                    </div>
                </div>

            </div>
        </>)
    }
}


export default Login